From c0536171422d0a82c2c958b1038c77d692bcd60b Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Wed, 13 Dec 2006 11:13:08 +0000 Subject: [PATCH] Check return of new_domain inside dom0_init, avoiding segfault if there is a second instance of xenstored running (and we're using different pid files). Signed-off-by: Ewan Mellor --- tools/xenstore/xenstored_domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c index d21ae7b9c7..75ff6e96d8 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstore/xenstored_domain.c @@ -459,6 +459,8 @@ static int dom0_init(void) return -1; dom0 = new_domain(NULL, 0, port); + if (dom0 == NULL) + return -1; dom0->interface = xenbus_map(); if (dom0->interface == NULL) -- 2.30.2